<?php
header("content-type:text/html; charset=utf-8");
$servername = "localhost";
$username = "root";
$password = "123";
$dbname = "test";
//mysql_query("set names 'utf8'");
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// 检测连接	
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
}
$stmt = $conn->prepare("INSERT INTO orders (style,price,num,name,mobile,region,address,mail,remark,goodsid,goodsname,sets) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)");
$stmt->bind_param("sssssssssiss",$style,$price,$num,$name,$mobile,$region,$address,$mail,$remark,$goodsid,$goodsname,$sets);
$style=$_GET["style"];
$price=$_GET["price"];
$num=$_GET["num"];
$name=$_GET["name"];
$mobile=$_GET["mobile"];
$region=$_GET["region"];
$address=$_GET["address"];
$mail=$_GET["mail"];
$remark=$_GET["remark"];
$goodsname=$_GET["goodsname"];
$goodsid=$_GET["goodsid"];
$sets=$_GET["combo"];
$stmt->execute();
echo "新记录插入成功";

$stmt->close();
$conn->close();



?>